import 'package:kkhousekeep/generated/json/base/json_field.dart';
import 'package:kkhousekeep/generated/json/home_bill_details_meter_fee_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class HomeBillDetailsMeterFeeEntity {
	late double itemCost;
	late double dosageCost;
	late double startDosage;
	late double endDosage;
	late String unit;

	HomeBillDetailsMeterFeeEntity();

	factory HomeBillDetailsMeterFeeEntity.fromJson(Map<String, dynamic> json) => $HomeBillDetailsMeterFeeEntityFromJson(json);

	Map<String, dynamic> toJson() => $HomeBillDetailsMeterFeeEntityToJson(this);

	HomeBillDetailsMeterFeeEntity copyWith({double? dosageCost, double? startDosage, double? endDosage, String? unit,double? itemCost}) {
		return HomeBillDetailsMeterFeeEntity()
			..itemCost = itemCost ?? this.itemCost
			..dosageCost= dosageCost ?? this.dosageCost
			..startDosage= startDosage ?? this.startDosage
			..endDosage= endDosage ?? this.endDosage
			..unit= unit ?? this.unit;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}